#! /bin/sh

d=20080710
t=0
while [ $t -ne 8 ]
do
./../Preprocess/Preprocess -t ../../../netCDF2KVSML/${d}/rm_rokka19_${d}__t_000$t.kvsml -outname ${d}_t_000$t.kvsml
mv ${d}_t_000$t.kvsml ../../../Data/Ocean/${d}t/
mv ${d}_t_000${t}_value.dat ../../../Data/Ocean/${d}t/
t=`expr $t + 1`
done

d=20080711
t=0
while [ $t -ne 8 ]
do
./../Preprocess/Preprocess -t ../../../netCDF2KVSML/${d}/rm_rokka19_${d}__t_000$t.kvsml -outname ${d}_t_000$t.kvsml
mv ${d}_t_000$t.kvsml ../../../Data/Ocean/${d}t/
mv ${d}_t_000${t}_value.dat ../../../Data/Ocean/${d}t/
t=`expr $t + 1`
done

d=20080710
s=0
b=2
while [ $b -ne 8 ]
do
d=20080710
while [ $d -ne 20080712 ]
do
    t=0
    while [ $t -ne 8 ]
    do
./../Compression/Compression -f ../../../Data/Ocean/${d}t/${d}_t_000$t.kvsml -Bspline -b $b -writezk -outname TemportureBlock_${b}_${d}_000$t.zk
    t=`expr $t + 1`
    s=`expr $s + 1`
    done
d=`expr $d + 1`
done
b=`expr $b + 1`
done